#include "process.h"
void ProcessOn()
{
    char style[5] = {'#','>','-','%','$'};//进度条样式
    char lable[7] = {'\\','-','/','|','\\','-','|'};
    char process[101] = {0};//进度条
    for(int cnt = 0; cnt <= 100; cnt++)
    {
        process[cnt] = style[S_NUM];//可以选择样式，STYLE默认为0
        printf("\033[30;47m[%-100s]%3d%%[%c]\r\033[0m",process,cnt,lable[cnt%7]);
        fflush(stdout);//刷新标准输出，使得printf的内容立刻显示到终端上
        usleep(40001);//单位为微秒的对该进程或线程暂停
    }
    putchar('\n');
}
